package com.geneqiao.jdbc;

import java.sql.Connection;
import java.util.List;
import java.util.Map;

public interface ISession
{
	<T> List<T> Query(Class<T> t, String sql);
	
	<T> List<T> Query(Class<T> t, String sql, Object... objects);
	
	<T> List<T> Query(Connection conn, Class<T> t, String sql);
	
	<T> List<T> Query(Connection conn, Class<T> t, String sql, Object... objects);
	
	List<?> QueryList(String sql);
	
	List<?> QueryList(String sql, Object... objects);
	
	List<?> QueryList(Connection conn, String sql);
	
	List<?> QueryList(Connection conn, String sql, Object... objects);
	
	<T> T Single(Class<T> t, String sql);
	
	<T> T Single(Class<T> t, String sql, Object... objects);
	
	<T> T Single(Connection conn, Class<T> t, String sql);
	
	<T> T Single(Connection conn, Class<T> t, String sql, Object... objects);
	
	Map<String, Object> QueryMap(String sql);
	
	Map<String, Object> QueryMap(String sql, Object... objects);
	
	Map<String, Object> QueryMap(Connection conn, String sql);
	
	Map<String, Object> QueryMap(Connection conn, String sql, Object... objects);
	
	Object getSingle(String sql);
	
	Object getSingle(String sql, Object... objects);
	
	Object getSingle(Connection conn, String sql);
	
	Object getSingle(Connection conn, String sql, Object... objects);
	
	boolean Execute(String sql);
	
	boolean Execute(String sql, Object... objects);
	
	boolean Execute(Connection conn, String sql);
	
	boolean Execute(Connection conn, String sql, Object... objects);
	
}
